﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace zymain
{
    public partial class FrmCxxg : Form
    {
        public List<string[]>  list= new List<string[]>();
        public FrmCxxg()
        {
            InitializeComponent();
        }

        private void saveBtn_Click(object sender, System.EventArgs e)
        {
            string djo = this.djTxt1.Text.Trim();
            string djt = this.djTxt2.Text.Trim();
            string djs = this.djTxt3.Text.Trim();
            if (!string.IsNullOrEmpty(djo))
            {
                try
                {
                    double dj = Convert.ToDouble(djo);
                    if (dj > 0)
                    {
                        Convert.ToInt32(this.dsTxt1.Text.Trim());
                        string[] ds = new string[] { djo, this.dsTxt1.Text.Trim() };
                        list.Add(ds);
                    }
                }
                catch { }
            }
            if (!string.IsNullOrEmpty(djt))
            {
                try
                {
                    double dj = Convert.ToDouble(djt);
                    if (dj > 0)
                    {
                        Convert.ToInt32(this.dsTxt2.Text.Trim());
                        string[] ds = new string[] { djt, this.dsTxt2.Text.Trim() };
                        list.Add(ds);
                    }
                    
                }
                catch { }
            }
            if (!string.IsNullOrEmpty(djs))
            {
                try
                {
                    double dj = Convert.ToDouble(djs);
                    if (dj > 0)
                    {
                        Convert.ToInt32(this.dsTxt3.Text.Trim());
                        string[] ds = new string[] { djs, this.dsTxt3.Text.Trim() };
                        list.Add(ds);
                    }
                }
                catch { }
            }
            DialogResult = DialogResult.OK;
            base.Close();
        }

        private void exitBtn_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            base.Close();
        }
    }
}
